package com.turing.merchant.feign;

import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import result.Result;

@FeignClient("system-server")
public interface CustomerWithdrawalsService {

    @GetMapping("/system/withdrawal/cwListForPc")
    Result cwListForPc(
            @RequestParam(value = "sourceId", required = false) String sourceId,
            @RequestParam(value = "targetId", required = false) String targetId,
            @RequestParam(value = "pageNum", required = false) Integer pageNum,
            @RequestParam(value = "pageSize", required = false) Integer pageSize,
            @RequestParam(value = "cwInfo", required = false) String cwInfo
    );

    @PostMapping("/system/withdrawal/cwAddSave")
    Result cwAddSave(@RequestBody JSONObject jsonObject);

    @PostMapping("/system/message/addSave")
    Result addSave(@RequestBody JSONObject jsonObject);

    @GetMapping("/system/dic/getDic")
    Result getDic(@RequestParam(value = "dicId") String dicId, @RequestParam(value = "dicName") String dicName);

    @PatchMapping("/system/dic/editSave")
    Result editSave(@RequestBody JSONObject jsonObject);

    @PostMapping("/system/withdrawal/kwAddSave")
    Result kwAddSave(@RequestBody JSONObject json);

}
